/**
 * 招募业务逻辑
 */
// const axios = require('axios');
const Router = require('@koa/router');
const { genResponse } = require('../utils');
const { MythicApply, MythicRecruit } = require('../db/schemas')

// const { BATTLE_NET } = require('../env')
// const ZwRedis = require('../redis/battlenet')

const router = new Router({ prefix: '/dungeon' })

router.get('/single', async (ctx) => {
  const { page = 0, page_size = 0, prev_last_id } = ctx.query
  const find = prev_last_id ? { _id: { $lt: prev_last_id } } : {}

  const results = await MythicApply.find(find).sort({ create_at: 1 }).limit(+page_size).lean()

  ctx.body = genResponse(true, results)
})
router.get('/single/:id', async (ctx) => {
})
router.post('/single', async (ctx) => {
})
router.put('/single', async (ctx) => {
})
router.delete('/single/:id', async (ctx) => {
})
module.exports = router